package dailyAccessCount;

import org.apache.hadoop.io.IntWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Mapper;

import java.io.IOException;

public class MyMapper extends Mapper<Object,Text, Text, IntWritable> {
    @Override
    public void map(Object key, Text value, Context context)
            throws IOException,InterruptedException {
        String line = value.toString();
        String[] array = line.split(",");
        String keyOutput = array[1];
        context.write(new Text(keyOutput),new IntWritable(1));
    }
}
